home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-12-08 | 45.0 KB | 1,177 lines | [TEXT/R*ch] |
- C.S.M.P. Digest Fri, 19 Jun 92 Volume 1 : Issue 117
-
- Today's Topics:
-
- Think Pascal Scrolling DITL's
- Questing about Think C debugger and After Dark Modules
- Translation Manager? (Re: How to use XTND in programs?REFRESH
- Memory Mapping of Video
- list manager alternative
- Any small sample code in 'C'?
- $$: Where/how do I find a consultant?
- PBControl / MacTCP
- How to update the whole screen???
- Color icons in menus? How?
- "Inside Macintosh" source recommendations?
- How to tell if a printer supports Postscript?
-
-
- The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
-
- These digests are available (by using FTP, account anonymous, your email
- address as password) in the pub/mac/csmp-digest directory on ftp.cs.uoregon.
- edu. This is also the home of the comp.sys.mac.programmer Frequently Asked
- Questions list. The last several issues of the digest are available from
- sumex-aim.stanford.edu as well.
-
- These digests are also available via email. Just send a note saying that you
- want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
- automatically receive each new digest as it is created.
-
- The digest is a collection of articles from the internet newsgroup comp.sys.
- mac.programmer. It is designed for people who read c.s.m.p. semi-regularly
- and want an archive of the discussions. If you don't know what a newsgroup
- is, you probably don't have access to it. Ask your systems administrator(s)
- for details. (This means you can't post questions to the digest.)
-
- The articles in these digests are taken directly from comp.sys.mac.programmer.
- They are not edited; all articles included in this digest are in their original
- posted form. The only articles that are -not- included in these digests are
- those which didn't receive any replies (except those that give information
- rather than ask a question). All replies to each article are concatenated
- onto the original article in the order in which they were received. Article
- threads are not added to the digests until the last article added to the
- thread is at least one month old (this is to ensure that the thread is dead
- before adding it to the digests).
-
- Send administrative mail to mkelly@cs.uoregon.edu.
-
- -------------------------------------------------------
-
- Subject: Think Pascal Scrolling DITL's
- From: paulm@steelmel.bhp.com.au
- Date: 18 May 92 15:38:39 +1000
- Organization: BHP Steel Group
-
- For some time I have been coming to grips with Think Pascal's (V 4.0, system
- 6.0.7 on a MacPlus) dialog classes. (I like the joke in the user manual about
- having an 'aha' experience after a couple of weeks).
-
- I am now trying to implement a scrolling DITL (The ones where you click on a
- word and it appears in a text edit box underneath). I originally had a static
- text DITL. When I ran my program this appeared without any worries. I changed
- the static text to @$CScrollPane$ScPn$1030 as I believe is necessary. I copied
- the ScPn resource across from the 'New Class Demo' program that came with Think
- Pascal, and made sure that the resource id was correct. However, when I run my
- program, I get a vertical scroll bar, and that's all. The DITL is not outlined
- as they usually are. Can anyone suggest what it is that I am not doing
- correctly?
-
- Also, a couple more questions: How do I tell the TCL which values to display in
- the scrolling pane? And how do I link a text edit item to a scrolling pane?
- That is, if I have two text edit boxes, how does the TCL know which text edit
- item to display the values in?
-
- Thank you for your assistance.
-
-
- Paul.
-
- ---------------------------
-
- From: darin_tomack.osbu_north@XEROX.COM
- Subject: Questing about Think C debugger and After Dark Modules
- Date: 12 May 92 19:17:34 GMT
-
-
- Okay, I'm new to Mac programming (but not C programming or programming in
- general) so please forgive my naivete about the Mac environment.
-
- I figured a nice little project to start with - to help boost my morale and get
- me really going - would be to write a nice little After Dark module and play
- with for a while before working myself up to a couple other projects I have in
- mind. The problem I'm having is that I can't figure out how, once I've gotten
- the thing together, I would debug it with the Think C debugger. Since the AD
- module is Code Resource that get's "loaded" into AD when it is to be run, then
- doesn't that mean that I have to somehow get the Think C debugger to run
- "around" the whole AD application as well as my code resource? Or do I have
- this all wrong and there is really a very simple way of doing this?
-
- Perhaps a more general way of putting this is this: Is there any way to debug
- a code resource that is not a standalone resource (ie. it makes calls into some
- other piece of code that loads it) where the loader is NOT part of the Think C
- Project?
-
- Or is the answer that I am out of luck and I need to use something like
- MacBugs? Also, as a side note, would I be any better off if I was trying to do
- this via MPW (SADE?) instead of using Think C?
-
- Thanks,
-
- @darin
-
- +++++++++++++++++++++++++++
-
- From: mike@optimla.aimla.com (Mike Diehr)
- Organization: Philips Interactive Media
- Date: Thu, 14 May 92 16:24:07 GMT
-
- In article <"12-May-92.12:17:34.PDT".*.Darin_C._Tomack.OSBU_North@Xerox.com> darin_tomack.osbu_north@XEROX.COM writes:
- >
- >Okay, I'm new to Mac programming (but not C programming or programming in
- >general) so please forgive my naivete about the Mac environment.
- >
- >I figured a nice little project to start with - to help boost my morale and get
- >me really going - would be to write a nice little After Dark module and play
- >with for a while before working myself up to a couple other projects I have in
- >mind. The problem I'm having is that I can't figure out how, once I've gotten
- >the thing together, I would debug it with the Think C debugger. Since the AD
- >module is Code Resource that get's "loaded" into AD when it is to be run, then
- >doesn't that mean that I have to somehow get the Think C debugger to run
- >"around" the whole AD application as well as my code resource? Or do I have
- >this all wrong and there is really a very simple way of doing this?
- >
- >Perhaps a more general way of putting this is this: Is there any way to debug
- >a code resource that is not a standalone resource (ie. it makes calls into some
- >other piece of code that loads it) where the loader is NOT part of the Think C
- >Project?
- >
- >Or is the answer that I am out of luck and I need to use something like
- >MacBugs? Also, as a side note, would I be any better off if I was trying to do
- >this via MPW (SADE?) instead of using Think C?
- >
- >Thanks,
- >
- > @darin
-
- I have the same question, but with hypercard XCMDs. My guess is that the
- answer is to create a dummy app in think C that will set up the required
- environment. However, this seems like a lot of trouble to me...
-
- - -mike
-
- +++++++++++++++++++++++++++
-
- From: daven@notable.com (Dave Newman)
- Date: 15 May 92 02:26:43 GMT
- Organization: Notable Technologies, Inc.
-
-
- In article <"12-May-92.12:17:34.PDT".*.Darin_C._Tomack.OSBU_North@Xerox.com> (comp.sys.mac.programmer), darin_tomack.osbu_north@XEROX.COM writes:
- | Perhaps a more general way of putting this is this: Is there any way to debug
- | a code resource that is not a standalone resource (ie. it makes calls into some
- | other piece of code that loads it) where the loader is NOT part of the Think C
- | Project?
- |
- | Or is the answer that I am out of luck and I need to use something like
- | MacBugs? Also, as a side note, would I be any better off if I was trying to do
- | this via MPW (SADE?) instead of using Think C?
-
- Unless After Dark provides a debugging testbench application for
- Think C that mimics the environment your AD module will run in, the
- answer is you'll have to use Macsbug, TMON Pro, or Jasik's The Debugger
- to do your debugging.
-
- - --Dave
-
- - -----------------------------------------------------------
- Dave Newman | AOL: AFC Tinman
- Artillery Spotter | CIS: 70743,3323
- Notable Technologies, Inc. | internet: daven@notable.com
- 510.208.4449 | FAX: 510.444.4493
- - -----------------------------------------------------------
-
- +++++++++++++++++++++++++++
-
- From: potts@itl.itd.umich.edu (Paul Potts)
- Organization: Instructional Technology Laboratory, University of Michigan
- Date: Mon, 18 May 92 15:06:18 GMT
-
- In article <1992May14.162407.27986@aimla.com> mike@optimla.aimla.com (Mike Diehr) writes:
- >In article <"12-May-92.12:17:34.PDT".*.Darin_C._Tomack.OSBU_North@Xerox.com> darin_tomack.osbu_north@XEROX.COM writes:
- ...
- >
- >I have the same question, but with hypercard XCMDs. My guess is that the
- >answer is to create a dummy app in think C that will set up the required
- >environment. However, this seems like a lot of trouble to me...
- >
- >-mike
-
- It isn't that difficult if you have the source code *and* if your XCMD/XFCN
- doesn't use any of the Hypercard callback routines. Basically, you can set
- up a dummy paramBlock structure pretty easily and call your XCMD/XFCN through
- it. I was able to add the code of an XCMD to a TCL project very easily using
- this method. It was a quick-and-dirty approach to adding a bunch of existing
- XCMD code to an application without having to recode a front end and new
- entry calls to the XCMD code. If there is any interest I can post the code,
- although like I said, it is just a quick-and-dirty hack.
-
- - --
- "breakpoints" _See_also_ debugging, watch expressions; "debugging breakpoints"
- _See_ breakpoints; "debugging watch expressions" _See_ watch expressions;
- "watch expressions" _See_also_ debugging... (Borland C++ manual index)
- Paul R. Potts, Software Designer --- potts@itl.itd.umich.edu <--- me!
-
- ---------------------------
-
- From: gft_robert@gsbacd.uchicago.edu (opcode ranger)
- Subject: Translation Manager? (Re: How to use XTND in programs?REFRESH
- Organization: ˇˇˇˇ
- Date: Tue, 12 May 1992 20:40:38 GMT
-
- Anybody know anything about the upcoming 'Translation Manager', and how that
- compares/interacts with XTND?
-
- Robert
-
- - --
- ==============================================================================
- = gft_robert@gsbacd.uchicago.edu * "Out there on a darkened road, the lights =
- = are dead and the cars explode" -- "Good Things", Sisters of Mercy =
- ==============================================================================
-
- +++++++++++++++++++++++++++
-
- From: leonardr@ccs.itd.umich.edu
- Organization: Campus Computing Sites, University of Michigan-Ann Arbor
- Date: Sun, 17 May 92 20:52:34 GMT
-
- In article <1992May12.144038.1@gsbacd.uchicago.edu> gft_robert@gsbacd.uchicago.edu (opcode ranger) writes:
- >Anybody know anything about the upcoming 'Translation Manager', and how that
- >compares/interacts with XTND?
- >
- I don't believe that I am permitted (under NDA) to comment on the
- details of the Translation Manager, but I think it would be permissable
- to say thbat XTND is a level beneath the Translation Manager which is a
- higher level "kind o' thing".
-
- Think of the difference as the Translation Manager is similar to
- the Communications toolbox, and XTND is like the Apple Modem Tool.
-
-
- - --
- - -----------------------------------------------------------------------
- Leonard Rosenthol Internet: leonardr@ccs.itd.umich.edu
- Director of Advanced Technology AppleLink: MACgician
- Aladdin Systems, inc. GEnie: MACgician
-
- +++++++++++++++++++++++++++
-
- From: nilesinc@well.sf.ca.us (Avi Rappoport)
- Date: 18 May 92 23:39:56 GMT
- Organization: Whole Earth 'Lectronic Link
-
- In <1992May12.144038.1@gsbacd.uchicago.edu> gft_robert@gsbacd.uchicago.edu (opcode ranger) writes:
-
- >Anybody know anything about the upcoming 'Translation Manager', and how that
- >compares/interacts with XTND?
-
- >Robert
-
- >--
- >==============================================================================
- >= gft_robert@gsbacd.uchicago.edu * "Out there on a darkened road, the lights =
- >= are dead and the cars explode" -- "Good Things", Sisters of Mercy =
- >==============================================================================
- According to Apple at the WWDC:
-
- The Translation Manager is the top, system-software layer, which will take
- care of automatically hooking translation to double-clicking icons (like
- Hand-Off), the Open File dialog, Subscribed Stuff, and the Clipboard. This
- is really nifty functionality, and will not require any work by the
- programs.
-
- The next layer down is the Translation System layer, where the DataViz and
- MasterSoft engines work (and XTND if it continues, which is uncertain).
- The Translation Manager will arbitrate and work with all Translation
- Systems.
-
- Lower still are the Translator modules, which talk to the various
- translation systems.
-
- There will be APIs of some sort for the Save File dialog, but it will not be
- automatic like the Open File dialog.
-
- (I forgot drag-and-drop, where the TM will improve the highlighting for apps
- that can translate documents).
-
- Technically, the top level looks really nice, and the demo was good.
-
- I continue to worry about the problems of distributing Translation Systems
- and Translator modules. Will everyone have to buy the systems from the
- third parties (who Apple has said they will support)? Will developers have
- to license translators or Translation Systems? How many times will users
- end up paying for this?
-
- Sigh.
- Avi
- - --
- - -- Ask me about EndNote and EndNote Plus Bibliography Makers --
- Avi Rappoport 2000 Hearst, Berkeley, CA 94709
- nilesinc@well.sf.ca.us, 510-649-8176
- Niles.Assoc on AppleLink fax: 510-649-8179
-
- ---------------------------
-
- From: stevem@cs.utexas.edu (Steve Anthony Mariotti)
- Subject: Memory Mapping of Video
- Date: 17 May 92 17:18:00 GMT
- Organization: U Texas Dept of Computer Sciences, Austin TX
-
- I noticed something strange the other day while playing around with video
- memory.
-
- I have an SE/30 with a RasterOps 264/30 (a 24-bit color card) hooked up to a
- Seiko 1445 14" monitor.
-
- I was storing values directly into video memory starting at 'ScrnBase.' I
- had the card set at 8-bit depth (256 colors) and noticed that at each address
- starting at ScrnBase, I could store a byte directly to my display. This
- worked as it should for the first 640 bytes--but at the 641st, the byte values
- were no longer storing to the screen (and wrapping to the next line as I
- suspected they would.) In fact, I had to store 384 extra bytes before the
- line would wrap to the second line on the monitor. At 'ScrnBase'+#1024, the
- second line began. I verified that this occurred for all lines on the screen
- and it seems that a full screen line is 1024 bytes, with only the leftmost
- 640 bytes actually displayed on the monitor, followed by 384 bytes which were
- writable and readable but displayed nowhere. 384 bytes doesn't seem to
- correspond to anything I can think of.
-
- Does anyone know why this occurs and could someone explain to me the cause of
- this? It would seem that all screen memory would be contiguous. I thought
- that perhaps it was related to the fact that my color card is a 24-bit card,
- but that doesn't explain 384, which is certainly not 640*2 which you would
- expect if writing off into memory reserved for 24-bit modes.
-
- Oddly, my friend experiences the same behavior on his MacII with an Apple
- 8-bit color card (the very first version.) His screen lines wrap at 1024 byte
- intervals in 8-bit monitors settings.
-
- The active display area seems to be left-justified on 1024 byte rows.
-
- What is that 'hyperspace' to the right of the active screen area? Do all Mac's
- behave this way at 8-bit depth? What does the 384 byte leftover stem from?
- If anyone can straighten this out for me, I'll be able to sleep again. This
- is something I just can't seem to find information on in any of the reference
- manuals I have (IM 1-6, TechNotes 4.0.4, ThinkRef, et.)
-
- Even pointers to information which describe this would be helpful.
-
- Thanks!
-
- Steve Mariotti
-
- stevem@cs.utexas.edu -- The University of Texas at Austin -- CS Undergrad(e)
-
- +++++++++++++++++++++++++++
-
- From: d88-jwa@byse.nada.kth.se (Jon W{tte)
- Date: 17 May 92 20:11:52 GMT
- Organization: Royal Institute of Technology, Stockholm, Sweden
-
- .edu> stevem@cs.utexas.edu (Steve Anthony Mariotti) writes:
-
- I was storing values directly into video memory starting at 'ScrnBase.' I
- had the card set at 8-bit depth (256 colors) and noticed that at each
- address starting at ScrnBase, I could store a byte directly to my display.
-
- BAD BAD BAD !
-
- Look in the UseNet Mac Programmers Guide for advice on this;
- it's covered in good detail. (along with handling different
- screen depths, SwapMMUMode and other stuff needed)
-
- This worked as it should for the first 640 bytes--but at the 641st, the
- byte values were no longer storing to the screen (and wrapping to the next
- line as I suspected they would.) In fact, I had to store 384 extra bytes
-
- That's because it's easier to add a k per line. Inside Mac V goes into
- GREAT detail about how color quickdraw works, and describes the pixMap
- structure, which also tells you how many bytes are in a row (not necessarily
- the same as the number of pixels in a row) - check it out ! IM VI goes on to
- explain 24bit video and other things.
-
- What is that 'hyperspace' to the right of the active screen area? Do all
- Mac's behave this way at 8-bit depth? What does the 384 byte leftover
- stem from? If anyone can straighten this out for me, I'll be able to sleep
- again. This is something I just can't seem to find information on in any
- of the reference manuals I have (IM 1-6, TechNotes 4.0.4, ThinkRef, et.)
-
- GO back to reading, do not pass GO, do not collect $200.
-
- I promise, this is covered in very good detail in inside mac V and VI.
-
- - --
- h++ - new and improved !
-
- You never hide the menu bar. You might go about and make it the same
- color as the background, but you never hide the menu bar. - Tog
-
- ---------------------------
-
- From: sinteur@ooc.uva.nl (John Sinteur)
- Subject: list manager alternative
- Date: 18 May 92 14:32:12 GMT
- Organization: ooc.uva.nl
-
- I've reached the point where the list manager no longer meets my
- demands (and, as the tech notes point out, this point should be
- reached pretty soon for anybody with serious 'list'like demands.
-
- Specifically, I need to resize individual cells - the list manager
- limits cells to one uniform size.
-
- As a result, I'm about to re-write the listmanager for my own
- purpose (hopefully winning some performance because the list manager
- 'knows' about my data structures - I expect to loose performance
- because I want more features out of it - if I'm lucky, this evens out)
-
- Now the question: has anybody already done this? If so, are you proud
- enough of it to show me your code? Any caveats you want to share?
-
- - -John
-
-
- +++++++++++++++++++++++++++
-
- From: Joe.Francis@dartmouth.edu (Joe Francis)
- Date: 18 May 92 17:45:56 GMT
- Organization: Dartmouth College, Hanover, NH
-
- In article <29193@slice.ooc.uva.nl>
- sinteur@ooc.uva.nl (John Sinteur) writes:
-
- > Now the question: has anybody already done this? If so, are you proud
- > enough of it to show me your code? Any caveats you want to share?
-
- I haven't done it so I can't share code, but I do have a caveat,
- nontheless.
-
- I suggest you give the calling code some access to any scroll bars (or
- other controls, for that matter) that your list code creates.
-
- A couple of years back, I wrote code to let you create panes within
- windows and to be able to treat all of these panes as if they had there
- own coordinate system. If you do this, you can never call
- "DrawControls", because all the controls in different panes are in
- different coordinate systems and most of them will show up in the wrong
- place. Instead each pane keeps a list of it's controls and call
- Draw1Control, after setting up the coordinate system. [I recently
- started playing with TCL and discovered it has a system for doing this
- nearly identical to my own - I guess that's a good sign...].
-
- One problem with this is that the list manager draws that darn scroll
- bar whenever it wants (and when it wants isn't always at a sensible
- time, especialy under system 6). Combine that with the above "pane"
- scenario and you get a random looking scroll bar popping up somewhre in
- the window. If you provide the user of your code with some way to
- enable/disable drawing that scroll bar, you can avoid this problem.
-
- Has anyone had this problem with TCL? From my glancing at the code it
- looks like they have not defended against it either (the old "he who
- uses the list manager gets what he deserves" stratagy - can't say that
- I disagree).
-
- ---------------------------
-
- From: PNCSPPC@CCVAX1.CC.NCSU.EDU
- Subject: Any small sample code in 'C'?
- Date: 16 May 92 04:23:29 GMT
-
-
- +++++++++++++++++++++++++++
-
- From: ppcalver@.eos.ncsu.edu (PHILIP P CALVERT)
- Date: 16 May 92 18:26:17 GMT
- Organization: NCSU Project Eos
-
-
- Hello! Anyone out there know of any public domain 'C' code that's
- available for downloading, and which would be good for a beginner to
- tinker around with? I want to learn 'C' but I don't want to type in those
- stupid little programs, that don't do anything useful, one commonly
- finds in books on how to learn 'C'. Preferably, the code should be in
- ANSI 'C' and be highly portable (or be written specifically for THINK C).
- Thanks in advance for any help.
-
- Phil Calvert
-
- preferred address for replies:
- <Bitnet: pncsppc@ncsuvax.bitnet / Internet: pncsppc@ccvax1.cc.ncsu.edu>
-
- +++++++++++++++++++++++++++
-
- From: ubacw00@ucl.ac.uk (Mick Farmer)
- Date: 18 May 92 11:39:48 GMT
- Organization: Bloomsbury Computing Consortium
-
- Hi,
-
- Phil Calvin is interested in a collection of ANSI C programs
- to help with learning C. Both my text book "The Intensive C
- Course" and a video production of the same title contain numerous
- examples, short and hopefully pertinent. These programs and files
- are available electronically. Just let me know.
-
- Regards,
-
- Mick
-
- ---------------------------
-
- From: felciano@medisg.stanford.edu (Ramon M. Felciano)
- Subject: $$: Where/how do I find a consultant?
- Date: 18 May 92 19:29:56 GMT
- Organization: SUMMIT (Stanford Univ. Medical Media and Information
-
-
- Hi!
-
- We're thinking about expanding one of our Hypercard-based courseware
- projects into an application, probably MacApp or THINK C based. This is
- still a while off, but I need to figure out how much money to budget for.
-
- I realize that there may be a more appropriate group to post this in, but
- I'm not sure which one it is. The biz one looked pretty sparse, so I
- thought I'd throw this out here. I have no idea what to budget for, as
- I've run into folks charging from $40 to $100 an hour.
-
- The project will be fixed-term (1 year) working full-time, either in our
- lab at Stanford or at a separate site (or both). Development will
- Object-Oriented, and will involve Quicktime, System 7 support, some
- cross-platform work (e.g. importing images), and database knowledge.
- Strong User Interface knowledge is a plus, although I'll be doing most of
- the interface design.
-
- Obviously, benefits will need to be considered as well.
-
- Can anyone give me some feedback on this, or tell me where I can get more
- information?
-
- Thanks!
-
- Ramon M. Felciano
- Associate Director, SUMMIT
- Stanford University Medical Media and Information Technologies
-
- +++++++++++++++++++++++++++
-
- From: mspace@netcom.com (Brian Hall)
- Date: Mon, 18 May 92 22:37:23 GMT
- Organization: Netcom - Online Communication Services (408 241-9760 guest)
-
- felciano@medisg.stanford.edu (Ramon M. Felciano) writes:
-
-
- >Hi!
-
- >We're thinking about expanding one of our Hypercard-based courseware
- >projects into an application, probably MacApp or THINK C based. This is
- >still a while off, but I need to figure out how much money to budget for.
-
- [stuff deleted]
-
- >Can anyone give me some feedback on this, or tell me where I can get more
- >information?
-
- Try the "Macintosh Services Directory" from the MZ Group. I think APDA
- sells it, or you could try an Apple dealer, or call 800-927-1100x400
- and order it direct. It contains listings of hundreds of consultants,
- development companies, etcs.
-
-
- - --
-
- \ | / | Brian Hall mspace@netcom.com
- - : - | Mark/Space Softworks Applelink: markspace
- /|\ | America Online: MarkSpace
- |-+-| |
- /-\|/-\ | People don't kill people, toasters kill people.
-
- ---------------------------
-
- From: jstevens@crick.ssctr.bcm.tmc.edu (Jason Philip Stevens)
- Subject: PBControl / MacTCP
- Date: 18 May 1992 20:46:28 GMT
- Organization: Baylor College of Medicine, Houston, Tx
-
-
- Another wierd case <sigh>. In using MacTCP, I make the call
- PBControl(&pb, TRUE). pb.ioCompletion = &iocomplete. iocomplete is a
- function defined in strict type accordance with the template that
- comes with MacTCP. The problem is that while the PBControl call
- returns, it never seems to call iocomplete. Ideas? Thanks in advance...
-
- - -Jason Stevens
- jstevens@bcm.tmc.edu
- - --
- Jason Stevens Phone: (713) 798-7370
- Network User Services FAX: (713) 798-6675
- Baylor College of Medicine InterNet: jstevens@bcm.tmc.edu
-
- +++++++++++++++++++++++++++
-
- From: resnick@cogsci.uiuc.edu (Pete Resnick)
- Organization: University of Illinois at Urbana
- Date: Mon, 18 May 1992 21:38:56 GMT
-
- jstevens@crick.ssctr.bcm.tmc.edu (Jason Philip Stevens) writes:
-
- >pb.ioCompletion = &iocomplete
- ^
- What is that "&" doing there? That's possibility 1.
-
- >PBControl(&pb, TRUE).
-
- What is this returning to you? Are you sure that it is returning noErr?
- If the ioCRefNum in the pb is wrong, it's gonna complain. That's
- possibility 2.
-
- And what sort of call are you making? A call to TCPPassiveOpen with a
- 0 (i.e. infinite) timeout will not complete until someone makes a
- connection. That's possibility 3.
-
- Anyone else?
-
- pr
- - --
- Pete Resnick (...so what is a mojo, and why would one be rising?)
- Graduate assistant - Philosophy Department, Gregory Hall, UIUC
- System manager - Cognitive Science Group, Beckman Institute, UIUC
- Internet: resnick@cogsci.uiuc.edu
-
- +++++++++++++++++++++++++++
-
- From: jstevens@crick.ssctr.bcm.tmc.edu (Jason Philip Stevens)
- Date: 18 May 1992 22:20:54 GMT
- Organization: Baylor College of Medicine, Houston, Tx
-
-
- In article <1992May18.213856.3666@news.cso.uiuc.edu>, resnick@cogsci.uiuc.edu (Pete Resnick) writes:
- |> jstevens@crick.ssctr.bcm.tmc.edu (Jason Philip Stevens) writes:
- |>
- |> >pb.ioCompletion = &iocomplete
- |> ^
- |> What is that "&" doing there? That's possibility 1.
-
- Right. Too much late-night programming. :)
-
- |> >PBControl(&pb, TRUE).
- |>
- |> What is this returning to you? Are you sure that it is returning noErr?
- |> If the ioCRefNum in the pb is wrong, it's gonna complain. That's
- |> possibility 2.
- |> And what sort of call are you making? A call to TCPPassiveOpen with a
- |> 0 (i.e. infinite) timeout will not complete until someone makes a
- |> connection. That's possibility 3.
-
- I'm calling TCPCreate, but asynchronously. Thus, according to IM vol II,
- a return of noErr (which I get), just means that the call was successfully
- placed on the queue. I'm pretty sure that the ioCRefNum is right (I know that
- the call to OpenDriver completes with noErr and that it sets the value of
- a variable to a # between -1 and -32; is there a way aside from that to know
- that it's "right"?). Since last posting I have discovered that a constant polling
- of ioResult yields a "busy" that never seems to end... it goes on for as long
- as I care to leave it (which is obviously too long :).
-
- If any other ideas spring forth, please e-mail to save bandwidth. I don't need
- program problems _and_ flames all at once...
-
- - -Jason Stevens
- jstevens@bcm.tmc.edu
-
-
- - --
- Jason Stevens Phone: (713) 798-7370
- Network User Services FAX: (713) 798-6675
- Baylor College of Medicine InterNet: jstevens@bcm.tmc.edu
-
- ---------------------------
-
- From: nyang@Bonnie.ICS.UCI.EDU
- Subject: How to update the whole screen???
- Date: 13 May 92 09:07:59 GMT
-
- Hi all,
-
-
- I am just a beginner at programming the Macintosh so if this is a really
- easy problem, don't flame me! My problem is that I have created a color
- grafPort of the same dimension as the screen, did some drawing to it, and then
- disposed it. Yet, nothing gets updated. So, I add:
-
- InvalRect(thePort^.portRect);
-
- but then the program crashed. I know there is got to be some way to update
- everything on the screen. Hope you Mac gurues out there can help me out.
-
- Thank you very much in advance!
-
- Nick Yang
- nyang@bonnie.ics.uci.edu
-
- +++++++++++++++++++++++++++
-
- From: jcav@quads.uchicago.edu (JohnC)
- Date: Wed, 13 May 1992 15:22:18 GMT
- Organization: The Royal Society for Putting Things on Top of Other Things
-
- In article <9205130207.aa21922@Bonnie.ics.uci.edu> nyang@Bonnie.ICS.UCI.EDU writes:
- > I am just a beginner at programming the Macintosh so if this is a really
- >easy problem, don't flame me! My problem is that I have created a color
- >grafPort of the same dimension as the screen, did some drawing to it, and then
- >disposed it. Yet, nothing gets updated. So, I add:
- >
- > InvalRect(thePort^.portRect);
- >
- >but then the program crashed. I know there is got to be some way to update
- >everything on the screen. Hope you Mac gurus out there can help me out.
-
- Well, your program crashed because _InvalRect (and _InvalRgn) only work on
- windows. They manipulate the updateRgn, which plain grafPorts don't
- have.
-
- Here's some code to use to cause the screen(s) to be completely redrawn:
-
- FUNCTION OpenGlobalPort (storage: Ptr; inColor: boolean): GrafPtr;
- BEGIN
- IF inColor THEN
- OpenCPort(CGrafPtr(storage))
- ELSE
- OpenPort(GrafPtr(storage));
- CopyRgn(GetGrayRgn, GrafPtr(storage)^.visRgn);
- GrafPtr(storage)^.portRect := GrafPtr(storage)^.visRgn^^.rgnBBox;
- OpenGlobalPort := GrafPtr(storage);
- END; { FUNCTION OpenGlobalPort }
-
- PROCEDURE RepaintScreens;
- VAR
- oldPort, bigPort: GrafPtr;
- bigPortRec: GrafPort;
- BEGIN
- {part 1}
- GetPort(oldPort);
- bigPort := OpenGlobalPort(@bigPortRec, false);
- PaintRgn(bigPort^.clipRgn);
- SetPort(oldPort);
- ClosePort(bigPort);
- {part 2}
- DrawMenuBar;
- {part 3}
- PaintBehind(WindowPeek(FrontWindow), GetGrayRgn);
- END; { PROCEDURE RepaintScreens }
-
-
- Comments:
-
- Part 1 is there to take care of those wierd cases where the area past the
- rounded corners of the screen has been "contaminated". I couldn't think of
- a better universal way to draw past the edge of the grayRgn.
- Part 2 takes care of the menu bar.
- Part 3 is the magic that takes care of all windows, plus the Finder's
- desktop. See the Window Manager chapter of IM-I for more about how/why this
- works.
-
- - --
- John Cavallino | EMail: jcav@midway.uchicago.edu
- University of Chicago Hospitals | John_Cavallino@uchfm.bsd.uchicago.edu
- Office of Facilities Management | USMail: 5841 S. Maryland Ave, MC 0953
- B0 f++ c+ g+ k s++ e+ h- pv | Chicago, IL 60637
-
- +++++++++++++++++++++++++++
-
- From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
- Date: 14 May 92 14:50:07 +1200
- Organization: University of Waikato, Hamilton, New Zealand
-
- In article <9205130207.aa21922@Bonnie.ics.uci.edu>, nyang@Bonnie.ICS.UCI.EDU writes:
- > My problem is that I have created a color
- > grafPort of the same dimension as the screen, did some drawing to it, and then
- > disposed it. Yet, nothing gets updated.
-
- I do this kind of messing about frequently myself. To save putting a call
- into all my test programs do the screen refreshing, I wrote an FKEY to solve
- the problem once and for all. I'm enclosing it in this message; paste it into
- your System file with ResEdit, and then you can just press command-shift-9 (or
- you can give it another number, if you prefer) to refresh the screen at any
- time.
-
- (This file must be converted with BinHex 4.0)
-
- So who says .hqx files can't be a valid contribution to a discussion?
-
- :-)
-
- Lawrence D'Oliveiro fone: +64-7-856-2889
- Computer Services Dept fax: +64-7-838-4066
- University of Waikato electric mail: ldo@waikato.ac.nz
- Hamilton, New Zealand 37^ 47' 26" S, 175^ 19' 7" E, GMT+13:00
-
- +++++++++++++++++++++++++++
-
- From: mauser@intercon.com (Richard Chandler)
- Date: 16 May 92 03:08:13 GMT
- Organization: InterCon Systems Corporation
-
- In article <1992May14.145007.8097@waikato.ac.nz>, ldo@waikato.ac.nz (Lawrence
- D'Oliveiro, Waikato University) writes:
- > In article <9205130207.aa21922@Bonnie.ics.uci.edu>,
- nyang@Bonnie.ICS.UCI.EDU
- > writes:
- > > My problem is that I have created a color
- > > grafPort of the same dimension as the screen, did some drawing to it, and
- > > then disposed it. Yet, nothing gets updated.
- >
- > I do this kind of messing about frequently myself. To save putting a call
- > into all my test programs do the screen refreshing, I wrote an FKEY to solve
- > the problem once and for all. I'm enclosing it in this message; paste it
- > into your System file with ResEdit, and then you can just press command-
- > shift-9 (or you can give it another number, if you prefer) to refresh the
- > screen at any time.
-
- Did you just create a GrafPort, or did you create a window? You can actually
- have GrafPorts and draw into them without a window. If you dispose of a
- GrafPort, there's no reason for the WindowManager to invalidate any of the
- WindowManagerPort.
-
- By the way, I once did a little test routine that would set the port to the
- WindowManagerPort (a no-no right there) invert the invalid region twice (to
- leave it normal) and set the port back. This was handy for figuring out what
- the invalid region actually was (And to find out that I was calling
- BeginUpdate for the wrong windowPtr....). It was educational. Call it right
- after BeginUpdate.
-
- - --
- Praying for the day when "Sex Scandal" is an oxymoron.
- "Ride a motorcycle. Save Gas, Oil, Rubber, Steel, Aluminum, Parking Spaces,
- The Environment, and Money. Plus, you get to wear all the leather you want!"
- Rich Chandler, DoD #296
-
- ---------------------------
-
- From: dank@calvin.usc.edu (Dan King)
- Subject: Color icons in menus? How?
- Date: 26 Apr 92 10:49:52 GMT
- Organization: University of Southern California, Los Angeles, CA
-
-
- Howdy, y'all. I've got a quick question that I can't seem to
- resolve. How does one put color icons into menus? I've seen
- this done (heck, even the Finder does it), and I know how to
- put black and white icons in, but color escapes me. (I know it's
- going to be something really simple that I missed, but hopefully
- this will save me a few hours of work...)
-
- For reference, I'm working in MacApp 3.0.
-
- Thanks.
- dank
-
- +++++++++++++++++++++++++++
-
- From: jpugh@apple.com (Jon Pugh)
- Date: 6 May 92 19:22:37 GMT
- Organization: Apple Co.
-
- In article <kvmjtgINNlu4@calvin.usc.edu>, dank@calvin.usc.edu (Dan King) writes:
- >
- >
- > Howdy, y'all. I've got a quick question that I can't seem to
- > resolve. How does one put color icons into menus? I've seen
- > this done (heck, even the Finder does it), and I know how to
- > put black and white icons in, but color escapes me. (I know it's
- > going to be something really simple that I missed, but hopefully
- > this will save me a few hours of work...)
-
- Anywhere you use an ICON resource, if there is a cicn resource of the same
- ID, then it will be used instead. Pretty tough, huh?
-
- Jon
-
- +++++++++++++++++++++++++++
-
- From: wooly@pine.circa.ufl.edu (LAMBERT)
- Date: 12 May 92 19:17:35 GMT
- Organization: University of Florida (ufl.edu)
-
- In article <24526@goofy.Apple.COM>, jpugh@apple.com (Jon Pugh) writes...
- >In article <kvmjtgINNlu4@calvin.usc.edu>, dank@calvin.usc.edu (Dan King) writes:
- >>
- >>
- >> Howdy, y'all. I've got a quick question that I can't seem to
- >> resolve. How does one put color icons into menus? I've seen
- >> this done (heck, even the Finder does it), and I know how to
- >> put black and white icons in, but color escapes me. (I know it's
- >> going to be something really simple that I missed, but hopefully
- >> this will save me a few hours of work...)
- >
- >Anywhere you use an ICON resource, if there is a cicn resource of the same
- >ID, then it will be used instead. Pretty tough, huh?
- >
-
- ok, well, how about color icons in the menubar, ala the apple icon?
- will this require writing an MDEF, and if so, can someone point me
- in the right direction for that? (I have IM I-V, but not VI)
- Is it possible to, say, change a character in the Chicago font to
- simulate this? These are probably silly questions, but I'm inter-
- ested, so don't be too harsh.
-
-
- - --------
- Mike Lambert
- WOOLY@pine.circa.ufl.edu - Internet
- WOOLY@UFPINE - BITNET
-
- +++++++++++++++++++++++++++
-
- From: leonardr@ccs.itd.umich.edu
- Organization: Campus Computing Sites, University of Michigan-Ann Arbor
- Date: Sun, 17 May 92 20:49:25 GMT
-
- In article <35498@uflorida.cis.ufl.edu> wooly@pine.circa.ufl.edu writes:
- >ok, well, how about color icons in the menubar, ala the apple icon?
- >will this require writing an MDEF, and if so, can someone point me
- >in the right direction for that? (I have IM I-V, but not VI)
- >Is it possible to, say, change a character in the Chicago font to
- >simulate this? These are probably silly questions, but I'm inter-
- >ested, so don't be too harsh.
- >
- Actually this would require either writing an MBDF (MenuBar Defination)
- or patching a trap (like _DrawString).
-
-
- - --
- - -----------------------------------------------------------------------
- Leonard Rosenthol Internet: leonardr@ccs.itd.umich.edu
- Director of Advanced Technology AppleLink: MACgician
- Aladdin Systems, inc. GEnie: MACgician
-
- ---------------------------
-
- From: flemmon@Auspex.COM (Frank Lemmon)
- Subject: "Inside Macintosh" source recommendations?
- Date: 5 May 92 22:21:25 GMT
- Organization: Auspex Systems, Santa Clara
-
-
- Does anyone have any suggestions for obtaining new "Inside Macintosh"
- volumes at a good price? I would like to find a book store in the San
- Jose, CA area that has these books at good prices... Or if there is a
- way to purchase the set at a discount through a mail order house or
- whatever, I'd like to find out about that...
-
- "Or is $20 - 25 a pop the only way to get MacEducated?"
-
- Thanks in advance,
-
- Frank Lemmon
- flemmon@auspex.com
-
- +++++++++++++++++++++++++++
-
- From: larson@tessa.iaf.uiowa.edu (dave larson)
- Date: 7 May 92 16:28:52 GMT
- Organization: University of Iowa, Image Analysis Facility
-
- Ditto on that note...!
-
- - --
- Dave Larson | 319-335-7900
- University of Iowa, Image Analysis Facility | 70 EMRB
- larson@tessa.iaf.uiowa.edu | Iowa City, IA 52242
-
- +++++++++++++++++++++++++++
-
- From: Jeremiah.Blatz@dartmouth.edu (Jeremiah Blatz)
- Date: 17 May 92 23:06:36 GMT
- Organization: Dartmouth College, Hanover, NH
-
- In article <12645@auspex-gw.auspex.com>
- flemmon@Auspex.COM (Frank Lemmon) writes:
-
- > Does anyone have any suggestions for obtaining new "Inside Macintosh"
- > volumes at a good price?
-
- If you have a CD-ROM, you can join APDA and get a subscription to
- develop for ~$25 (4 quarterly issues). This not only includes Inside
- Mac's 1-6 (electronicly) but also the Tech. Notes and other stuff
- (again, all on the CD).
-
- Jeremiah
-
- ---------------------------
-
- From: mike@zorch.SF-Bay.ORG (Mike Smithwick)
- Subject: How to tell if a printer supports Postscript?
- Organization: SF-Bay Public-Access Unix
- Date: Thu, 14 May 1992 20:00:27 GMT
-
- []
-
- The subject says it all.
-
- How can I tell if the printer I am writing to supports Postscript?
-
- mike
-
- - --
- "There is no problem too big that can't be solved with high explosives"-Rush
-
- Mike Smithwick - ames!zorch!mike
-
-
- +++++++++++++++++++++++++++
-
- From: reed@snake.tc.cornell.edu (Mike Reed)
- Organization: Cornell National Computer Facility
- Date: Thu, 14 May 1992 23:54:00 GMT
-
- First off, why do you want to know if a printer supports postscript?
- According to IM, you should NEVER assume anything about printing, NOR
- should you try to do anything fancy...The problem is that you really
- cannot tell if the printer you are going to is postscript, unless you have
- a complete list of all of Apple's wDevs that they have issued and what
- printers were issued to what wDevs and whether or not they support
- Postscript. Let me tell you, the number cannot be too small because I
- got two wDevs for printer drivers I wrote last summer and they were in the
- 130-140 range. Now either Apple blocked off a bunch for their own internal
- use, or there are a LOT of issued wDevs. Best bet it you REALLY need
- to send some specific postscript command (and I personally would frown on
- it, because my printer driver would barf in your applications face) is to
- limit yourself only to the wDev for a LaserWriter. Besides, don't forget
- printers like the Personal Laserwriters (not all are postscript.) Overall,
- it is generally a BAD idea to do this.
-
- PS. If you really want to know, the wDev can be obtained from the Print
- Record returned from prValidate or prOpenDoc. Look in IM2 (I think).
-
- - -Michael
-
- - ---------------------------------------------------------------------------
- Michael G. Reed (reed@Theory.TC.Cornell.EDU)
-
- Cornell National Supercomputer Facility (Technology Integration Group)
- Engineering And Theory Center, Room 747
- Hoy Road (607)/254-8806 [work]
- Ithaca, New York 14853-3801 (USA) (607)/253-7962 [home]
- - ---------------------------------------------------------------------------
- DISCLAIMER: The views expressed above are not those of my employer.
- - ---------------------------------------------------------------------------
-
- +++++++++++++++++++++++++++
-
- From: orpheus@reed.edu (P. Hawthorne)
- Date: 15 May 92 21:53:29 GMT
- Organization: Reed College, Portland OR
-
-
- reed@theory.tc.cornell.edu (Michael Reed) writes:
- : First off, why do you want to know if a printer supports postscript?
- : According to IM, you should NEVER assume anything about printing, NOR
- : should you try to do anything fancy...
-
- Written like a true unbeliever. PostScript is definitely worth
- addressing specifically, even to the point of ignoring other printers in
- some cases. Heresay to some, reality to others.
- For your average printing application, make no assumption you need not
- make. Do everything in your power to work on everything, but sometimes, you
- just gotta do what you just gotta do.
- Check into the picComments and use them wherever possible. If a printer
- driver supports those, you should support them. Make an effort.
-
- If you need to image serious graphics that cannot be imaged in
- QuickDraw without rewriting large chunks of PostScript, using PostScript
- can be easily forgiven.
- It is not unknown in the world of PostScript illustration packages to
- assume that any printer chosen is a genuine PostScript device, and that any
- others are utterly beside the point. Apple and the Macintosh owe much of
- their survival to such "fancy" things.
- Remember however, by doing such a thing you are cutting your market
- down dramatically in order to radically improve the product for the
- remaining segment. In the ideal world, you would cope with both segments.
-
-
- : The problem is that you really cannot tell if the printer you are going
- : to is postscript....
-
- You can get information about the chosen printer from within the
- system file, and confirm that it has an entity type of laserwriter. The
- original poster, or anyone else, could bug me to get out the specifics.
- Anyone else remember?
-
- Theus
- orpheus@reed.edu
-
- +++++++++++++++++++++++++++
-
- From: reed@snake.tc.cornell.edu (Mike Reed)
- Organization: Cornell National Computer Facility
- Date: Fri, 15 May 1992 23:18:00 GMT
-
- [deleted]
-
- > You can get information about the chosen printer from within the
- > system file, and confirm that it has an entity type of laserwriter. The
- > original poster, or anyone else, could bug me to get out the specifics.
- > Anyone else remember?
- >
- > Theus
- > orpheus@reed.edu
-
- You make the very points I was trying to convey (so it didn't really
- come out that way...). The only problem is that I beg to differ with
- your last point. You can check for a SPECIFIC PRINTER DRIVER, but not a
- specific printer. Even then, you need the wDev list because this is the
- only relyable identifying mark. Pretty much all of the rest of the
- Print Record can be anything (there is NO set standard...Apple
- recommends one that they themselves to do religously follow).
-
- - -Michael
-
- - ---------------------------------------------------------------------------
- Michael G. Reed (reed@Theory.TC.Cornell.EDU)
-
- Cornell National Supercomputer Facility (Technology Integration Group)
- Engineering And Theory Center, Room 747
- Hoy Road (607)/254-8806 [work]
- Ithaca, New York 14853-3801 (USA) (607)/253-7962 [home]
- - ---------------------------------------------------------------------------
- DISCLAIMER: The views expressed above are not those of my employer.
- - ---------------------------------------------------------------------------
-
- +++++++++++++++++++++++++++
-
- From: marshall@sdd.hp.com (Marshall Clow)
- Date: 18 May 92 18:24:31 GMT
- Organization: Hewlett Packard San Diego Printer Division
-
- In article <1992May15.231800.28423@tc.cornell.edu>, reed@snake.tc.cornell.edu (Mike Reed) writes:
- >
- > [deleted]
- >
- > > You can get information about the chosen printer from within the
- > > system file, and confirm that it has an entity type of laserwriter. The
- > > original poster, or anyone else, could bug me to get out the specifics.
- > > Anyone else remember?
- > >
- > > Theus
- > > orpheus@reed.edu
-
- How about getting the PACK resource (-4096) and checking the flags
- (longword at offset $C) Bit 31 determines if it's an AppleTalk device,
- Bit 30 says if it uses PAP, Bit 29 says if it's postscript, and so on.
- Documented (partially) in IM-IV, pp217, and in some very old MacTutor
- articles.
- Otherwise, you have to check the wdev in the print record, and determine
- that the high byte is 3. This identifies the LaserWriter driver, which
- _most_ postscript printers use.
-
- Marshall Clow
- Hewlett-Packard
- marshall@sdd.hp.com
-
- ---------------------------
-
- End of C.S.M.P. Digest
- **********************
-